package com.ruoyi.lifecycle.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaCheckRole;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
import com.ruoyi.lifecycle.domain.bo.TFundBo;
import com.ruoyi.lifecycle.domain.bo.TMileStoneBo;
import com.ruoyi.lifecycle.domain.vo.TFundVo;
import com.ruoyi.lifecycle.domain.vo.TMileStoneVo;
import com.ruoyi.lifecycle.service.ITFundService;
import com.ruoyi.lifecycle.service.TMileStoneService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author Zzneko
 * @Date 2025/6/9 14:22
 * @Descprition
 **/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/fundMilestone")
@Slf4j
public class TMileStoneController {

    private final TMileStoneService tMileStoneService;
    private final ITFundService tFundService;

    @GetMapping("/one")
    @SaCheckPermission("product:lifecycle:list")
    public R<TMileStoneVo> one(@Validated TMileStoneBo bo){
        return tMileStoneService.getTMileStoneInfos(bo);
    }

    @GetMapping("/product")
    @SaCheckPermission("product:lifecycle:list")
    public R<List<TFundVo>> listProduct(){
        return R.ok(tFundService.queryList(new TFundBo()));
    }

}
